package com.joysuch.wwyt.edu.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.joysuch.wwyt.core.entity.BaseUser;
import com.joysuch.wwyt.edu.bean.EduTrainingPlanListVo;
import com.joysuch.wwyt.edu.bean.EduTrainningRecordQueryDto;
import com.joysuch.wwyt.edu.entity.EduCourseStatistics;
import com.joysuch.wwyt.edu.entity.EduTrainningRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 描述：
 *
 * @author Eric
 * @since 2022-07-05
 */
@Mapper
public interface EduCourtTrainningRecordMapper extends BaseMapper<EduCourseStatistics> {

    Page<EduTrainningRecordQueryDto> getCourseRecordQueryPageList(Page<EduTrainningRecordQueryDto> page, String departName, String userName, String startTime, String stopTime, Long tenentId, String orgCode);

    List<EduTrainningRecordQueryDto> getCourseRecordQueryList(String departName, String userName, String startTime, String stopTime, Long tenentId, String orgCode);

    EduTrainningRecordQueryDto getUserLeaningTotleTime(String departName, String userId, String startTime, String stopTime, Long tenentId, String orgCode);

    BaseUser getBaseUser(String userName);

    Page<EduCourseStatistics> findAllList(Page<EduCourseStatistics> page);

    Page<EduTrainingPlanListVo> findAllUserPlans(Page<EduTrainingPlanListVo> page,Long userId,List<String> statusList,Integer state);

    EduCourseStatistics selectByUserId(@Param("userId") Long userId);

    List<EduTrainningRecord> selectByPlanId(@Param("id") Long id);

}
